package com.bluesky.android.webservice;

import java.util.ArrayList;

import com.bluesky.android.webservice.HandleXMLFactory.HandlerType;

public class MangaReaderService {
	
	private static BaseFetcher fetcher;
	@SuppressWarnings("unchecked")
	public static ArrayList<String> getMangaChapterData(String key, String url){
		ArrayList<String> resultValue = null;
		fetcher = new BaseFetcher(HandlerType.GET_CHAPTER_IMAGE_LINK);
		fetcher.addPropertyInfo("key", key, String.class);
		fetcher.addPropertyInfo("url", url, String.class);
		resultValue = ((ArrayList<String>) fetcher.fetch());
		return resultValue;
		
	}
	public static MangaCollection getMangaCollection(String key, String url, int page){
		MangaCollection resultValue = null;
		fetcher = new BaseFetcher(HandlerType.GET_MANGA_COLLECTION);
		fetcher.addPropertyInfo("key", key, String.class);
		fetcher.addPropertyInfo("url", url, String.class);
		fetcher.addPropertyInfo("page", page, int.class);
		resultValue = (MangaCollection) fetcher.fetch();
		return resultValue;
	}
	
	public static MangaStoryDetail getMangaStoryDetail(String key, String url)
	{
		MangaStoryDetail resultValue = null;
		fetcher = new BaseFetcher(HandlerType.GET_MANGA_DETAIL);
		fetcher.addPropertyInfo("key", key, String.class);
		fetcher.addPropertyInfo("url", url, String.class);
		resultValue = ((MangaStoryDetail) fetcher.fetch());
		return resultValue;
	}
}
